/*    
 * Copyright (c) 2013 ISoftStone, Inc.
 * All right reserved.
 *
 * 文件名：      BillCycleConfigServiceImpl.java
 * 作者:     Jacky Wang
 * 创建日期： 2013-7-26 上午10:24:13
 * 版本：           
 *
 */
package com.isoftstone.industry.aaa.core.service.assist.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.isoftstone.industry.persistance.bean.BillCycleConfig;
import com.isoftstone.industry.aaa.core.dao.assist.BillCycleConfigDao;
import com.isoftstone.industry.aaa.core.service.assist.IBillCycleConfigService;
import com.isoftstone.industry.aaa.utils.SystemProperties;
import com.isoftstone.modules.core.persistence.IGenericDao;
import com.isoftstone.modules.core.service.impl.GenericServiceImpl;

/**
 *
 * @author jacky
 */
@Service
public class BillCycleConfigServiceImpl extends GenericServiceImpl<BillCycleConfig, String> implements IBillCycleConfigService
{
	@Resource
	private BillCycleConfigDao billCycleConfigDao;
	@Resource
	private SystemProperties systemProperties;
	
	@Override
	public IGenericDao<BillCycleConfig, String> getDao()
	{
		return billCycleConfigDao;
	}

	@Override
	public BillCycleConfig getSystemDefaultCycleConfig()
	{
		String id = systemProperties.getSysDefultBillCycleConfigId();
		return findOne(id);
	}

	@Override
	public BillCycleConfig getByUser(String userId)
	{
		//目前所有用户统一使用系统默认出帐周期配置
		return getSystemDefaultCycleConfig();
	}
}
